{include file="header.html"}

<div class="page-header">
	<h6>
		城市管理
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			城市修改
		</small>
	</h6>
</div>
<div class="row">
<div class="col-xs-12">
	<form class="form-horizontal" role="form" method="post" action="?app=city&act=edit" enctype="multipart/form-data">
		<input type="hidden" name="id" value="{$row->id}" />
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="name"> 城市名称 </label>
			<div class="col-sm-10">
				<input type="text" id="name" name="name" value="{$row->name}" class="col-xs-6" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="pinyin"> 城市编码 </label>
			<div class="col-sm-10">
				<input type="text" id="city_id" name="city_id" value="{$row->city_id}" class="col-xs-1" />  &nbsp; 
				<a href="javascript:void(0)" onclick="javascript:get_city_code();">查找城市编码</a>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="pinyin"> 所属省份 </label>
			<div class="col-sm-10">
				<select name="province_id" id="province_id"></select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="pinyin"> 拼音字母 </label>
			<div class="col-sm-10">
				<input type="text" id="pinyin" name="pinyin" value="{$row->pinyin}" class="col-xs-1" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="first_letter"> 首字母 </label>
			<div class="col-sm-10">
				<input type="text" id="first_letter" name="first_letter" value="{$row->first_letter}" class="col-xs-1" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="market_price"> 城市是否已经开通 </label>
			<div class="col-sm-10">
				<div class="radio">
					<label>
						<input value="0" name="opening" type="radio" class="ace" {if $row->opening==0}checked{/if} />
						<span class="lbl"> 是</span>
					</label>
				</div>
				<div class="radio">
					<label>
						<input value="1" name="opening" type="radio" class="ace" {if $row->opening==1}checked{/if} />
						<span class="lbl"> 否 </span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="sort"> 排序 </label>
			<div class="col-sm-10">
				<input type="text" id="sort" name="sort" value="{$row->sort}" class="col-xs-2" />
			</div>
		</div>

		<div class="clearfix form-actions">
			<div class="col-md-offset-3 col-md-9">
				<button class="btn btn-info" type="submit">
					<i class="ace-icon fa fa-check bigger-110"></i>
					提交
				</button>

				&nbsp; &nbsp; &nbsp;
				<button class="btn" type="reset">
					<i class="ace-icon fa fa-undo bigger-110"></i>
					重置
				</button>
			</div>
		</div>
	</form>
</div>
</div>

{include file="footer.html"}
<script>
	function get_city_code() {
		self.location='?app=city&act=get_city_code&city='+$('#name').val();
	}
</script>


<script type="text/javascript" src="/js/city.js"></script>
<script>
$(function(){
	showCity({ province:'#province_id', provincecode:'{$row->province_id}' });
});
</script>